I make two kinds of maps about Guangzhou,a city in southern China.The GUI-based one is made in ArcGIS,showing the population density in different regions.The code-based type is made in R language by ggplot,maptools and mapproj packages,which shows the total population of different governance regions of Guangzhou. Here are my maps,the first one is the ArcGIS map, the second type is the R map. In order to reveal the population density clearly and comprehensively, the assignment represents the data from the difference of genders in GIS and R software.

Capture the picture.

Capture the picture.

library(maptools)
library(mapproj)
library(ggplot2)
library(plyr)

setwd("C:/Users/Shera/Desktop/Region")
mydata1 = readShapeSpatial("DATAREGION.shp")
## Warning: readShapeSpatial is deprecated; use rgdal::readOGR or sf::st_read
## Warning: readShapePoly is deprecated; use rgdal::readOGR or sf::st_read
class(mydata1)
## [1] "SpatialPolygonsDataFrame"
## attr(,"package")
## [1] "sp"
names(mydata1)
## [1] "OBJECTID" "Sum_POP"  "Sum_M"    "Sum_F"
x<-mydata1@data
xs<-data.frame(x,id=seq(0:12)-1)

mydata = fortify(mydata1)
## Regions defined for each Polygons
china_mapdata<-join(mydata, xs, type = "full") 
## Joining by: id
ggplot(china_mapdata,aes(x=long,y=lat,group=group,fill = Sum_M)) +
geom_polygon(colour="white") +
scale_fill_gradient(low="grey100",high="grey40") +
coord_map("polyconic")

## Warning: readShapeSpatial is deprecated; use rgdal::readOGR or sf::st_read
## Warning: readShapePoly is deprecated; use rgdal::readOGR or sf::st_read
## [1] "SpatialPolygonsDataFrame"
## attr(,"package")
## [1] "sp"
## [1] "OBJECTID" "Sum_POP"  "Sum_M"    "Sum_F"
## Regions defined for each Polygons
## Joining by: id

“A Comparasion between ArcGIS and R Language” The comparison about mapping principles Data are from the census data of Guangzhou City and accurate to the street office. These data are not obtained in fixed-granular units, so there are only two methods to draw the population distribution. One is to estimate the population distribution through the gravity model. This method is shown in the graph drawn by ArcGIS; the other is to restore the original statistical unit through the integration of administrative divisions. This method is the basis of the map drawn by R. The comparison about work-flow and characters 1. The GUI-based mapping software has a visually directed work-flow while the code-based mapping language has a data-based work-flow. 1)When using the GUI-based mapping software like ArcGIS, I can analyze the data from different sources and use a lot of familiar tools to merge or sum up the data. I can choose different colours At the time of making a specific operation on the map, I will first look at the vision of the map then consider the target map I want to get. Then, based on the differences between the two maps, I will consider a geo-tool in ArcGIS toolbox. After choosing a right tool, I will cautiously drag or select the data together into the tool and run the tool. Finally, a target map will emerge on my screen or I will fail the operation with a red sign on the bottom of my screen. This is absolutely a kind of work-flow based on the target and vision. 2.When I draw a map using R language, the most important thing I must keep in mind is the structure of the data. R language uses data frame as the most common data structure. When I want to draw a map, I will first think about the data structure of the raw data, then the structure of the data I want to visualize. The merging or joining fuctions will be used to merge the data, then the function “ggplot” will be used to visualize the data. To sum up, the data is the most important thing while drawing a map with R language. 2. The differences of making analysis based on the geographic position of the data ArcGIS is a good tool to make geographic analysis while R is a great tool to make dynamic maps with data from different sources. In ArcGIS, it is very easy to join or calculate the data based on the geographic position and the information in the data. The map is static and cannot change itself without the operation by yourself. Whereas, after changing data in R, the only thing you should do is run the code again and make the new map with all new features in it. References Data resources: http://www.stats.gov.cn/tjsj/pcsj/rkpc/6rp/indexch.htm Wilk, J., 2015. Using Symbolic Data in Gravity Model of Population Migration to Reduce Modifiable Areal Unit Problem (MAUP). Statistics in Transition. New Series, 16(2), pp.243–264.